<?php
    include '../../../controlador/php/conexion/Conexion.php';
    $con = new Conexion();
    
    $mecdec = "select mecoid, mecnombre
              from dnmecanisdet order by mecnombre asc";
    $resul=$con->query($mecdec);  
    
    while($res = mssql_fetch_array($resul)){
        $listas[] = array_map(utf8_encode,$res);
    }
    
    print_r(json_encode($listas));
    $con->cerrarConexion();
?>